package com.common.dao.jdbc;

import java.util.List;
import java.util.Map;

import org.springframework.jdbc.support.KeyHolder;

import com.common.dao.IBaseDB;
import com.common.model.Pagination;

public interface IBaseJdbcDao extends IBaseDB {

	public int executeByTransaction(String[] sqls, Object[] outObjs);

	public int executeByTransaction(String[] sqls,
			List<Map<String, Object>> inParms, Object[] outObjs);

	public int deleteForSimple(String sql);

	public int insertForSimple(String sql);

	public int updateForSimple(String sql);

	public int executeForSimple(String sql);

	public int insertForParam(String sql, Map<String, Object> params);

	public int deleteForParam(String sql, Map<String, Object> params);

	public int updateForParam(String sql, Map<String, Object> params);

	public List<Map<String, Object>> selectForSimple(String sql);

	public List<Map<String, Object>> selectForParam(String sql,
			Map<String, Object> paramMap);

	public Pagination selectByPaginationWithMySql(String sql,
			Map<String, Object> paramMap, int pageSize, int page);

	public Pagination selectByPaginationWithOracle(String sql,
			Map<String, Object> paramMap, int pageSize, int page);

	public int insertGetGeneratedKey(final String sql,
			final List<Object> params, final String[] keyNames);

	public Map<String, Object> callProcedure(String procedureName,
			Map<String, Object> map);

	public int insertByMap(String tableName, Map<String, Object> fields);

	public int[] executeByBatch(String sql, List<Object> list);

	public int[] executeByBatch(String sql, Map<String, Object>[] params);

	public int[] executeByBatchWithTransaction(String sql, List<Object> list);

	public int insertByBean(String tableName, Object javaBean);

	public KeyHolder insertByBean(String tableName, String key, Object javaBean);

	public KeyHolder insertGetGeneratedKey(String tableName, String key,
			Map<String, Object> param);

	public List<Map<String, Object>> selectForBean(String sql,
			Map<String, Object> params);

	public List<Map<String, Object>> selectForBean(String sql);

	public int insertBySomeFields(String tableName,
			Map<String, Object> parameters);

	public KeyHolder insertBySomeFields(String tableName, String key,
			Map<String, Object> parameters);
}
